package com.neusoft.feign.controller;

import com.neusfot.domain.Student;
import com.neusoft.feign.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping("/queryStu.do")
    public Student queryStu()
    {
        return userService.findStudent();
    }

    @RequestMapping("/queryStuByid/{id}")
    public Student queryStudentByID(@PathVariable("id") Integer id)
    {
       return userService.findStudentByID(id);
    }
}
